home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / activedn / activedn.asp next >
Text File  |  1998-08-22  |  930b  |  33 lines

  1. <%@ LANGUAGE="VBSCRIPT" %>
  2.  
  3. <%
  4.  
  5. ' ActiveDNS.asp 1.0
  6. ' (c) 1998, Activity Software 
  7. '
  8. ' Example of ActiveDNS using Active Server Pages.  This can be used
  9. ' on any server which ActiveDNS.DLL is registered.
  10. ' This example is in VBScript.  For an example in JScript, please
  11. ' refer to ActiveDNS.js, which is designed for Microsoft Windows
  12. ' Scripting Host.
  13. '
  14.  
  15. Set dns = Server.CreateObject("ActiveDNS.Resolve")
  16.  
  17. Address = "127.0.0.1"
  18. Hostname = "localhost"
  19.  
  20. If dns.IsValidNumericAddress(Address) Then
  21.  Response.Write Address & " Is a valid numeric address.<BR>"
  22. Else
  23.  Response.Write Address & " Is not a valid numeric address.<BR>"
  24. End If
  25.  
  26. Response.Write "Host: " & Hostname & " resolves to address: " & _
  27.                             dns.Lookup(Hostname) & "<BR>"
  28.  
  29. Response.Write "Address: " & Address & " resolves to host: " & _ 
  30.                             dns.ReverseLookup(Address)  & "<BR>"
  31.  
  32. %>